﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CreateStruct
{
    class Program
    {
        static void Main(string[] args)
        {
            Person person = new Person("Pedro", "Pinto", 22, Genders.Male);
            Console.WriteLine(person.ToString());
            Console.ReadKey();
        }
    }

    public enum Genders { Male, Female };

    struct Person
    {
        public string firstName;
        public string lastName;
        public int age;
        public Genders gender;

        public Person(string firstName, string lastName, int age, Genders gender)
        {
            this.firstName = firstName;
            this.lastName = lastName;
            this.age = age;
            this.gender = gender;
        }

        public override string ToString()
        {
            return firstName + " " + lastName + " (gender " + gender + "), age " + age;
        }

    }
}
